package com.sky.mapper;

import com.sky.entity.SetmealDish;
import com.sky.vo.DishItemVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    List<Long> getSetMealByDishIds(List<Long> ids);

    //批量的插入数据
    void insertBatch(List<SetmealDish> setmealDishList);

    //根据套餐id进行查询数据
    @Select("select * from setmeal_dish where setmeal_id = #{setmealId}")
    List<SetmealDish> queryById(Long setmealId);

    @Delete("delete  from setmeal_dish where setmeal_id = #{setmealId}")
    void deleteById(long setmealId);

    void deleteByIds(List<Long> setmealIds);

    List<DishItemVO> queryDishBySetMealId(Long setmealId);
}
